package cm.server.dao;

import cm.server.entity.area;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

//service通过@Resource调用
@Repository
public interface areaRepository extends JpaRepository<area, Long> {
    //    实现查找
    List<area> findAllByArea(Integer area);

    List<area> findByArea(int area);

    List<area> findByTime(int time);

    List<area> findByNum(int num);

    List<area> findByDensity(float density);

    //    实现删除
    void deleteAllByArea(int area);

    void deleteByArea(int area);

}